<?php
/**
 * @version $Id: component.php 5426 2006-10-11 04:38:35Z Jinx $
 * @package Joomla
 * @subpackage Config
 * @copyright Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved.
 * @license GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */

jimport( 'joomla.application.component.controller' );

/**
 * Note: this view is intended only to be opened in a popup
 * @package Joomla
 * @subpackage Config
 */
class HotelsControllerDestination extends JController
{

	/**
	 * Custom Constructor
	 */
	function __constuct( $default = array())
	{
		parent::__construct( $default );
	}

	
	function display() {
		
		echo JRequest::getCmd('task');
		switch(JRequest::getCmd('task')){
			case 'cancel':
				$this->cancel();
				break;
			case 'save':
			case 'apply':
				$this->save();
				break;
			case 'add':
				$this->hotels( false );				
				break;
			case 'edit':
				$this->hotels( true );				
				break;
			case 'publish':
			case 'unpublish':
				$this->publish();				
				break;
			default:
				$this->listDestination();
				break;
		}	
	}

	function listDestination(){
		global $mainframe;
		
		$view = new DestinationComponentView( );
	    $view->listDestination();
	}
}
?>
